package com.hf.security

import com.hf.constant.OrderLunchConst
import com.hf.mail.MailMessage
import com.hf.mail.MailSenderService

class MailUserCodeService {
	
	MailSenderService mailSenderService

	void send(ValidCode validCode) {
		MailMessage mail = new MailMessage()
		mail.to = [validCode.email]
	
		mail.subject = OrderLunchConst.FROM_ORDER_LUNCH + "This is your register code"
		
		mail.plainText = "code :" + validCode.code
			
		mailSenderService.sendAsyn(mail)
	}
}
